﻿/// You are given an array of strings. Write a method that sorts the array by the length of its elements
/// (the number of characters composing them).

using System;

class zad5
{

    static void Main()
    {
        string[] arr = { "az", "werreew", "gertef", "jkids", "mknuu" };

        int[] lenArr = new int[arr.Length];

        for (int i = 0; i < arr.Length; i++)
        {
            lenArr[i] = arr[i].Length;
        }

        Array.Sort(lenArr, arr);

        for (int i = 0; i < arr.Length; i++)
        {
            Console.WriteLine("{0} - length {1}", arr[i], arr[i].Length);
        }
    }
}

